const http = require('http')
const server = http.createServer((req,res) =>{
    if (req.url === '/') {
        res.end('Welcome to the Homepage');
    }else if (req.url === '/about'){
        res.end('this is the About page');
    }else{
        res.statusCode = 404;
        res.end('Page Not Found');
    }
});
server.listen(3000,'127.0.0.1',() =>{
    console.log('Server running at http://127.0.0.1:3000/');
});